/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package test;

import gnu.trove.list.array.TShortArrayList;
import gnu.trove.map.custom_hash.TObjectDoubleCustomHashMap;
import gnu.trove.map.hash.TObjectDoubleHashMap;
import java.util.Random;

/**
 *
 * @author Luis A Riveros
 */
public class Trove {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {


        int num = 5000000;
        long ini;
        Random r = new Random();
        gnu.trove.map.TObjectDoubleMap<String> map = new TObjectDoubleHashMap<String>();
        ini = System.currentTimeMillis();
        for (int i = 0; i < num; i++) {
            map.put(String.valueOf(i), r.nextDouble());
        }
        Double d;
        for (int i = 0; i < num; i++) {
            d = map.get(String.valueOf(i));
        }
        System.out.println("Total: " + (System.currentTimeMillis() - ini));
    }
}
